home *** CD-ROM | disk | FTP | other *** search
-
- Sun Sep 10 14:08:55 EDT 1995
-
- Hi!
-
- Here's a (very) little utility I wrote one sunny Sunday afternoon to
- chronometer a few tasks precisely. Chrono, when called, pauses until the
- user (that's you) presses the ENTER key (aka RETURN).
- While it's chronometering, chrono can display the current time count every
- second or every tenth of a second.
-
- For example, I use it in conjunction with dip to monitor my time usage on my
- local Internet Service Provider. The script I use to call my ISP starts
- dip in a reduced window and then chrono displays the online time until I
- type RETURN in that window, which kills dip and disconnects the modem.
- The total online time is then appended to a log file.
-
- Well, it looks like this:
-
- #!/bin/sh
- dip /root/bin/ISP.dip 2>&1
- start=`date`
- total=`chrono -t`
- /bin/echo "$start -> `date` Total: $total" >>/root/.ISPlog
- dip -k -l modem
- exit
-
- And the log:
- Sun Sep 10 03:41:29 EDT 1995 -> Sun Sep 10 03:43:30 EDT 1995 Total: 00:02:00.8
- Sun Sep 10 03:49:26 EDT 1995 -> Sun Sep 10 04:52:06 EDT 1995 Total: 01:02:39.6
- Sun Sep 10 09:35:58 EDT 1995 -> Sun Sep 10 11:19:34 EDT 1995 Total: 01:43:36.3
- Sun Sep 10 13:50:27 EDT 1995 -> Sun Sep 10 13:53:30 EDT 1995 Total: 00:03:02.9
-
- No doubt, other people will find other uses for it.
-
- Included in chrono.tgz are the source, a pre-compiled executable, a man
- page, and this readme file.
-
-
- To Install:
-
- cp chrono /usr/local/bin (or somewhere in your $PATH)
- cp chrono.man /usr/local/man/man1/chrono.1 (or somewhere in your $MANPATH)
-
- To use:
-
- chrono -h (Get help)
- chrono (To try out)
- elapsed=`chrono -t` (To put in a script)
- elapsed=`chrono -n` (In a script but silent)
-
- Copyright policy: None. You are free to copy, modify, erase, publish,
- sell, smoke, degrade, ridicule, put your name in the code and tell your
- friends you wrote it for all I care, give to your auntie Louise, and
- upload chrono anywhere, anyhow, anywhen.
-
-
- Send comments, suggestions, and flames to danny@limestone.kosone.com.
- Be seeing you!
- --
- danny@limestone.kosone.com
- Daniel Chouinard
- System Manager (not a programmer), CAET Project, Kingston CFB, Ont. Canada.
- McDonnell Douglas Training Systems
-